const a = async function (
  _,
  { row },
  _01,
  { dc: { open, close }, xe: { get } }
) {
  const layout = { id: "1795985244162146306" };
  const modal = {
    title: "编辑标签",
    width: "55vw",
    height: document.body.clientHeight * 0.35,
    defaultFullscreen: false,
    destroyOnClose: false,
    maskClosable: false,
    open: true,
    centered: true,
    showCancelBtn: true,
  };
  const inner = {
    onOk: async function (_, { origin, validate }, { dc: { http, message } }) {
      const validateRes = await validate();
      if (validateRes["1795985531509719041"] !== true) return;
      const params = get(origin, "1795985531509719041", {});
      const { code, msg } = await http.post(
        {
          url: "/nyk/tag/modifyTag",
          data: { ...params },
        },
        { isTransformResponse: false }
      );
      if (code !== 200) {
        message.error(msg);
      } else {
        close(true);
      }
    },
  };
  open({ inner, layout, modal, transfer: row });
};

// const b = async function (
//   _,
//   { $grid, row },
//   { memory },
//   { dc: { open }, xe: { get } }
// ) {
//   const ret = await new Promise((resolve) => {
//     const transfer = row;
//     const layout = { id: "1785946370247495682" };
//     const modal = {
//       title: "编辑项目",
//       width: "55vw",
//       height: document.body.clientHeight * 0.55,
//       defaultFullscreen: false,
//       destroyOnClose: false,
//       maskClosable: false,
//       open: true,
//       showOkBtn: false,
//       showCancelBtn: true,
//       centered: true,
//       afterClose: function () {
//         const ret = get(memory, "modal", false);
//         delete memory.modal;
//         resolve(ret);
//       },
//     };
//     const inner = {};
//     open({ inner, layout, modal, transfer });
//   });
//   console.log("modal ret: ", ret);
//   if (!ret) return;
//   $grid.commitProxy("query");
// };
